package sugarbind_input

class DiseaseController {

    def scaffold = true
	
	def findDiseases = {
		println("findDiseases params : " +params)
			
		def diseases = Disease.listDiseases()
		def selected


		try
		{
			selected = Disease.get(params.disease)
		}
		catch(Exception ex)
		{
			println(ex.getMessage())
		}
		println(diseases)
		println("selected diseases : "+selected)
		
		render(template: 'ddlDiseases', model:  [diseases : diseases, selected:selected])
	  }
}
